Send Messages According to Conditions
You can configure sending multiple messages within a single email, each with different content depending on a set of conditions. Each template in the email can have a condition attached, and Bizagi evaluates these conditions to determine which templates to include.
Configuring Multiple Messages
-
Enable Multiple Messages
- Check the Multiple Messages box to create a new tab above the Subject field. You can add multiple templates by clicking the last tab (marked with a star).
- Check the Multiple Messages box to create a new tab above the Subject field. You can add multiple templates by clicking the last tab (marked with a star).
-
Set Individual Message Details
- Each message can have its own subject and template.
-
Define Conditions for Each Message
- Use the Set Conditions option in the upper-right corner. Clicking this opens a new window where conditions can be defined. Each condition must return a Boolean value (
true
orfalse
).
- Use the Set Conditions option in the upper-right corner. Clicking this opens a new window where conditions can be defined. Each condition must return a Boolean value (
Example: Sending Emails Based on Customer Location
Imagine a scenario where customers in different countries receive promotional emails offering specific products.
-
Select the Activity
- Navigate to the Activity Actions option in the fourth step of the Process Wizard. Choose the activity where the email will be sent, click Add, and select the Email option.
- Navigate to the Activity Actions option in the fourth step of the Process Wizard. Choose the activity where the email will be sent, click Add, and select the Email option.
-
Choose Addressees
- Select the To field and include the customer's email address from the process data.
- Select the To field and include the customer's email address from the process data.
-
Create the First Template
- Enter a subject and body for the first message template.
- Enter a subject and body for the first message template.
-
Add Additional Templates
- Check the Multiple Messages box and click the last tab (the one with a star) to add another template.
- Check the Multiple Messages box and click the last tab (the one with a star) to add another template.
-
Set Details for Additional Templates
- Include the addressee, subject, and body for the new template. Then, click Set Conditions.
- Include the addressee, subject, and body for the new template. Then, click Set Conditions.
-
Define Conditions for Each Template
- Click the Condition link for each template to open the condition editor. For example, the first template could evaluate if the customer is male.
- Repeat this step for the second template.
- Click the Condition link for each template to open the condition editor. For example, the first template could evaluate if the customer is male.
-
Delete Conditions (Optional)
- To delete a condition, double-click the trash icon in the Delete column, then confirm by clicking Yes.
- To delete a condition, double-click the trash icon in the Delete column, then confirm by clicking Yes.
-
Save the Configuration
- Click OK and then Save to finalize.
Multiple Messages in Production
Once a project has been deployed, some elements, like notifications, remain editable in the Development environment. However, Bizagi restricts changes to conditions for notifications in production environments.
- Editable Fields in Production:
- Templates and the To field remain editable.
- Conditions cannot be changed or deleted.